package view;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

public class CardLabel extends JLabel implements MouseListener {
	static final long serialVersionUID = 6669994;
	Actionable actn;
	
	public CardLabel(ImageIcon img, Actionable actn) {
		super(img);
		this.actn = actn;
		addMouseListener(this);
	}
	
	@Override
	public void mouseClicked(MouseEvent e) {
		actn.action(this);
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub

	}

}
